namespace Cos.Core.NHibernate
{
    public class NavDataModel
    {
        public NavDataModel()
        {
            this.Id = -1;
        }

        public virtual bool InheritPermissions { get; set; }

        public virtual int Id { get; set; }

        public virtual int NavOrder { get; set; }

        // public virtual IEnumerable<NavDataModel> ChildrenNavs { get; set; }

        // public virtual IEnumerable<PageDataModel> Pages { get; set; }

        // public virtual IEnumerable<AclDataModel> Acls { get; set; }

        public virtual int? TemplateId { get; set; }

        public virtual int? ParentId { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as NavDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }
    }
}